package com.bosssoft.boss_exam_db.service.busines.impl;

import com.bosssoft.boss_exam_db.entity.ResumeParameter;
import com.bosssoft.boss_exam_db.mapper.ResumeParameterMapper;
import com.bosssoft.boss_exam_db.service.base.impl.BaseServiceImpl;
import com.bosssoft.boss_exam_db.service.busines.ResumeParameterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import tk.mybatis.mapper.entity.Example;
import java.util.List;

/***
 * @Author lys(cherish)
 * @Phone 17720799636
 * @Date  2019/3/14
 * @Description 简历项信息服务
 * @since JDK 1.8
 **/
@Service
@Slf4j
public class ResumeParameterServiceImpl extends BaseServiceImpl<ResumeParameter> implements ResumeParameterService {

    //注入ResumeParameterMapper
    @Autowired
    private ResumeParameterMapper resumeParameterMapper;


    /***
     * @Author lys(cherish)
     * @Phone 17720799636
     * @Date  2019/3/14
     * @Description 查询应聘人简历
     * @Param [id]
     * @Return java.util.List<com.bosssoft.boss_exam_db.entity.ResumeParameter>
     * @Exception //无
     * @since JDK 1.8
     **/
    @Override
    public List<ResumeParameter> queryByApplicantId(String id) {
        if(StringUtils.isEmpty(id)){
           return null;
        }
        Example example = new Example(ResumeParameter.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("applicantId",id);
        List<ResumeParameter> resumeParameters = resumeParameterMapper.selectByExample(example);
        return resumeParameters;
    }
}
